1. Field of the Invention
This invention relates to generally to file backup and restore operations for computer systems. More particularly, the invention relates to a system and method for preventing files from being corrupted when a restore operation fails.
2. Description of the Related Art
Various software tools exist for backing up data files from a computer system and restoring the backed-up files to the computer system. Such tools are provided to permit recovery from user error or hardware failure in the backed-up computer system, or to insure against disaster situations originating outside the computer system that cause data loss by damaging the computer system.
One general backup technique is to backup files in a volume at the file level, e.g., to backup the files on a file-by-file basis. In this technique, all the data for a given file in the volume is typically backed up, followed by all the data for the next file, etc. In a corresponding restore operation, the files may be restored to the volume on a file-by-file basis. For example, all the data for one file may be restored, followed by all the data for the next file, etc.
Another general backup technique is to backup the volume at the storage device block level rather than on a file-by-file basis. In this technique, the blocks of the volume may be sequentially read from the disk drive or other storage device on which the volume is stored and written to a backup image on a backup storage device. Data for a given file may be fragmented on the disk drive, e.g., rather than all the data being stored in contiguous block locations. Since the backup image is effectively an exact block-level image of the original volume, the data for various files may also be fragmented in the backup image such that data for different files are interleaved with each other. If a restore operation fails when restoring multiple files from a block-level backup image, e.g., from a tape drive or other sequential access device, then all of the files that were being restored can end up in a corrupted state since only some of their data blocks may have been successfully restored before the failure.